class EventPosition {
    String name
    String description
    Date startDate
    Date endDate
    String location
    int numberOfVolunteers

    // event positions are deleted when events are deleted
    static belongsTo = [Event]
    static hasMany = [volunteers: Volunteer]

    static constraints = {
        name(blank:false)
        description(blank:false)
        numberOfVolunteers(min:1)
        startDate(nullable:true)
        endDate(nullable:true)
    }
}
